package com.cn.icss.validator;

import com.jfinal.core.Controller;
import com.jfinal.kit.Ret;

/**
 * @中软华腾软件系统有限公司,未经授权不得擅自传播
 * @类描述:
 * @类名称:StreamValidator
 * @作者: Administrator
 * @编辑时间: 2020/04/08 19:12
 * @版本: 1.0
 */
public class ThumbUpValidator extends BaseValidator {

    @Override
    protected void validate(Controller c) {
        setRet(Ret.fail());// 官网推荐
        // 判断写各个方法的验证
        switch (super.getActionMethodName()) {

            case "queryThumbUp":
            case "thumbUpMinus":
            case "clearThumbUp":
            case "thumbUpPlus": {
                super.validateRequired("key", "key_msg", "key不能为空");
                break;
            }
            default: {

            }
        }
    }

}
